package com.itstyle.seckill.common.designPattern.mingling;

public class Switcher {
    private Switchable switchable;
    public void setSwitchable(Switchable switchable){
        this.switchable = switchable;
    }

    public void buttonOnClick(){
        System.out.println("按下开...");
        switchable.on();
    }

    public void buttonOffClick() {
        System.out.println("按下关……");
        switchable.off();
    }
}
